package com.suxin.test.netty.adv.server.async;

import io.netty.util.NettyRuntime;

import java.util.concurrent.*;

/**
 * @Author: tang
 * @Description:
 * @Date 2025/1/21 16:25
 */
public class AsyncBusiProcess {

    private static BlockingQueue<Runnable> taskQueue  = new ArrayBlockingQueue<Runnable>(3000);
    private static ExecutorService executorService = new ThreadPoolExecutor(1,
            NettyRuntime.availableProcessors(),60, TimeUnit.SECONDS,taskQueue);

    public static void submitTask(Runnable task){
        executorService.execute(task);
    }

}
